FROM java:8
VOLUME /tmp
ADD hx-server-web.jar hx-server-web.jar
RUN bash -c 'touch /hx-server-web.jar'
ENV JAVA_OPTS="-server -Xms2560m -Xmx2560m -XX:MaxMetaspaceSize=512m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:CompressedClassSpaceSize=256m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:./logs/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../logs/dump.log"
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /hx-server-web.jar --spring.profiles.active=prod --server.port=5566" ]